﻿@using ZoomLa.BLL
@using ZoomLa.BLL.Helper
@model ZoomLa.Model.M_UserInfo
@{
    Layout = "~/Views/Shared/_empty.cshtml";
}
@section head{
<link href="/App_Themes/User.css" type="text/css" rel="stylesheet" />
<style>
.h_user_top{ padding:5px 10px; background:#f5f5f5; box-shadow:0 2px 5px #eee;}
.h_login{ margin:auto; margin-top:5px; padding:20px; width:340px; max-width:100%; box-shadow:0 0 10px 1px rgba(115,255,255,0.3); background:linear-gradient(#fff,#f5f5f5);}
.h_login li{ position:relative; margin-top:10px; margin-bottom:10px;}
.h_login li i{ position:absolute; top:10px; left:10px; font-size:1.2em; color:#337AB7;}
.h_login li .form-control{ padding-left:40px; border:none;} 
.h_login .form-control:focus{ box-shadow:none;}
#BtnLogin{ width:100%;}
</style>
<title>会员登录</title>
}
@section content{
@if (Model.IsNull)
{
<form method="post" action="Login">
    <div class="h_login">
        <ul class="list-unstyled">
            <li>
                <i class="fa fa-user"></i>
                <input type="text" id="TxtUserName" name="TxtUserName" title="用户名不能为空" class="form-control required" placeholder="用户名" />
            </li>
            <li>
                <i class="fa fa-lock"></i>
                <input type="password" id="TxtPassword" name="TxtPassword" title="密码不能为空"  class="form-control required" placeholder="密码" />
            </li>
            @*<li>
                    <asp:PlaceHolder ID="PhValCode" runat="server">验证码：<asp:TextBox ID="TxtValidateCode" MaxLength="6" Width="60" class="l_input" runat="server" onfocus="this.select();"></asp:TextBox>
                        <asp:Image ID="VcodeLogin" runat="server" ImageUrl="~/Common/ValidateCode.aspx" Height="20px" /></asp:PlaceHolder>
                </li>*@
            <li>
                <div class="text-center">
                    <input type="submit" class="btn btn-primary" value="登录" />
                    <a href="/User/Register" class="btn btn-default margin_l20" target="_top">注册</a>
                </div>
                @*<asp:Button ID="BtnLogin" runat="server" class="center-block btn btn-primary" Text="登录" OnClick="BtnLogin_Click" />*@
                <div class="text-right">
                    @if (!string.IsNullOrEmpty(ViewBag.err))
                    {
                        <div class="r_red pull-left">@ViewBag.err</div>
                    }
                    <a href="/User/Change/GetPassword" target="_top">忘记密码</a>
                </div>
            </li>
        </ul>
    </div>
</form>
}
else
{
<div class="h_login">
    <ul>
        <li>@Model.HoneyName，您好！</li>
        <li>未读信息：@(new B_Message().GetUnReadMail(Model.UserID).Rows.Count)</li>
        <li>登录次数：@(Model.LoginTimes)次</li>
        <li>最近登录：@(DateHelper.ToDate(Model.LastLoginTimes))</li>
        <li><a href="/User/" target="_top">会员中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/User/User/logout" target="_top">退出登录</a></li>
    </ul>
</div>
<iframe name="pasd" id="pasd" style="display: none;"></iframe>
}
}
@section script{
<script>
 $("form").validate();
</script>
}